<?php

class IndexController extends Zend_Controller_Action
{

    public function init()
    {
        $ajaxContext = $this->_helper->getHelper('AjaxContext');
        $ajaxContext->addActionContext('date-time', 'json')->initContext();
    }

    public function indexAction()
    {
    	$this->view->title = "Welcome";
    	$this->view->adminEmail = $this->_getAdminEmail();
    }

    public function menuAction()
    {
        
    }

    public function dateTimeAction()
    {
    	$currentDateTime = date('M d, Y h:i:s a', time());
    	$data = array('dateTime' => $currentDateTime);
    	$this->_helper->json($data);
    }
    
    protected function _getAdminEmail()
    {
    	$config = Zend_Registry::get('config');
    	return $config->admin->email;
    }
}





